# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-names
_pkgname=names
pkgver=0.3.0
pkgrel=9
epoch=1
pkgdesc='Random name generator.'
arch=('any')
url='https://pypi.org/project/names/#files'
license=('MIT')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/names-$pkgver.tar.gz")
sha512sums=('cdc65b688b82be00f2b40fc4276bed6980d8cf2868976ef604c9776de7dc541f715dfd4c8905a031611515e504b6d13fd0a6c95c5c1f69ab16ed3bf26a360d83')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

